#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "KHtmlParser.h"


int main()
{
	khtml_buffer buf;
	FILE *hFile = fopen("test.txt", "w");
	if (khtml_file2buffer("translate.txt", &buf) == khr_ok)
	{

		//fprintf(hFile, "%s", (char*)buf.m_pBuffer);
		for (int i = 0; i < buf.m_iBufSize; i++)
		{
			fprintf(hFile, "%c", ((char*)buf.m_pBuffer)[i]);
		}
		khtml_freebuffer(&buf);
	}
	fclose(hFile);
	return 0;
}